<template>
  <div class="search-container">
    <div class="search-header">
      <div class="search-title">
        <i class="el-icon-search"></i>
        <h2>搜索结果</h2>
      </div>
      <div class="search-info" v-if="title">
        <span>关键词：</span>
        <el-tag type="primary" effect="light">{{ title }}</el-tag>
      </div>
    </div>
    <div class="search-content">
      <blog-list />
    </div>
  </div>
</template>

<script>
import BlogList from "@/components/BlogList";
export default {
  name: "Search",
  components: {BlogList},
  data() {
    return {
      title: this.$route.query.title
    }
  },
  created() {

  },
  methods: {}
}
</script>

<style scoped>
.search-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 200px);
}

.search-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.search-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.search-title {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.search-title i {
  font-size: 24px;
  color: #667eea;
  margin-right: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-title h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-info {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.search-info span {
  color: #7f8c8d;
  margin-right: 8px;
  font-weight: 500;
}

.search-content {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.search-content:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* 自定义标签样式 */
/deep/.el-tag {
  border-radius: 20px;
  padding: 6px 16px;
  font-weight: 500;
  border: none;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  transition: all 0.3s ease;
}

/deep/.el-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .search-container {
    padding: 16px;
  }
  
  .search-header {
    padding: 20px 24px;
  }
  
  .search-title h2 {
    font-size: 1.5rem;
  }
  
  .search-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .search-container {
    padding: 12px;
  }
  
  .search-header {
    padding: 16px 20px;
  }
  
  .search-title {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-title i {
    margin-bottom: 8px;
    margin-right: 0;
  }
  
  .search-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-info span {
    margin-bottom: 8px;
    margin-right: 0;
  }
}
</style>